},
_updateButtons: function() {
- if (this.state != ModalDialog.State.OPENING &&
- this.state != ModalDialog.State.OPENED)
- return;
-
let dialogContent = DialogContent[this._type];
let buttons = [{ action: Lang.bind(this, this.cancel),
label: _("Cancel"),
this._inhibitors.push(inhibitor);
}
+ this._updateButtons();
+
if (!this.open(timestamp))
throw new DBus.DBusError('org.gnome.Shell.ModalDialog.GrabError',
"Cannot grab pointer and keyboard");
- this._updateButtons();
this._updateContent();
let signalId = this.connect('opened',
coordinate: Clutter.BindCoordinate.POSITION | Clutter.BindCoordinate.SIZE });
this._group.add_constraint(constraint);
- global.focus_manager.add_group(this._group);
- this._initialKeyFocus = this._group;
- this._savedKeyFocus = null;
-
this._group.connect('destroy', Lang.bind(this, this._onGroupDestroy));
this._actionKeys = {};
{ expand: true,
x_align: St.Align.MIDDLE,
y_align: St.Align.END });
+
+ global.focus_manager.add_group(this._dialogLayout);
+ this._initialKeyFocus = this._dialogLayout;
+ this._savedKeyFocus = null;
},
setButtons: function(buttons) {
this.state = State.CLOSING;
this.popModal(timestamp);
+ this._savedKeyFocus = null;
Tweener.addTween(this._group,
{ opacity: 0,